package main

import "fmt"

func main()  {

	var p1 Person
	p1.name="studeng"
	p1.age=454

	var s1 Student
	s1.Person=p1
	s1.sex="男"
	s1.address="ddddddddddddddd"

	fmt.Println(s1)   //{{studeng 454} 男 ddddddddddddddd}


}
type Person struct {
	name string
	age int
}
type Student struct {
	Person   //匿名结构体字段
	sex string
	address string

}
